package com.lwl.entity;

import lombok.Data;
import lombok.ToString;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author Lei
 * @create 2022-10-19 9:57
 */
@Data
@ToString
@Table(name = "t_user")
public class Tuser {
    @Id
    private Integer id;
    private String  username;
    private String password;
    private String salt;
    private String imgpath;
    private String sex;
    private Integer rid;
    private Date createtime;
    private Date updatetime;
    private Integer status;

//    用户：角色 == 多：一
//    Transient:短暂的，这个标签的作用时，在User表进行单表查询时忽略此字段。
    @Transient
    private TRole role;
}
